import { ADD_NUM } from './types.js'

const data = {
  num: 0
}

export default (state = data, action) => {
    const newState = JSON.parse(JSON.stringify(state));
    console.log(state,action);
    switch (action.type) {
        case 'ADD_NUM':
            newState.num += action.value;
            return newState;
    }
    return state;
}
